// miniprogram/pages/wxfor/test.js
Page({
  data: {
    list: [{
        name: '张三',
        score: {
          miniapp: 100,
          php: 99,
          linux: 98
        }
      },
      {
        name: '李四',
        score: {
          miniapp: 100,
          php: 89,
          linux: 90
        }
      },
      {
        name: '王五',
        score: {
          miniapp: 87,
          php: 98,
          linux: 87
        }
      },
      {
        name: '赵六',
        score: {
          miniapp: 99,
          php: 78,
          linux: 93
        }
      }
    ],
    msg: 'hello world'
  },
  click(e) {
    const id = e.target.dataset.id
    wx.showToast({
      title: `${this.data.list[id].name}: 
      ${this.data.list[id].score.miniapp}
      ${this.data.list[id].score.php} 
      ${this.data.list[id].score.linux}`
    })
  },
})

function parseItem(item) {
  return item.score.php
}